<div class="window">
    <div class="window-status" ng-if="isLoading">
        <div class="progress-bar"></div>
    </div>
    <header class="window-head">
        <img class="__logo" ng-src="{{uiCustomization.contrast_logo || '/images/contrast-logo.png'}}" />
        <span class="window-t">{{ 'platform.blades.forgotpassword.title' | translate }}</span>
    </header>
    <div class="window-cnt">
        <form class="form" novalidate ng-submit="ok()" name="thisForm">
            <div class="form-group list __info" ng-if="!succeeded">
                <label class="form-label">{{ 'platform.blades.forgotpassword.labels.login' | translate }}</label>
                <div class="form-input">
                    <input type="text" name="login" ng-model="viewModel.userName" placeholder="{{ 'platform.blades.forgotpassword.placeholders.login-or-email' | translate }}" required autofocus />
                </div>
                <div class="list-descr" ng-bind="'platform.blades.forgotpassword.labels.description' | translate"></div>
            </div>

            <div class="form-group" ng-if="succeeded">
                <div ng-bind="'platform.blades.forgotpassword.labels.success' | translate"></div>
            </div>
            <div class="form-group" ng-if="!isLoading && thisForm.$submitted && !succeeded && !errors">
                <div class="form-error" ng-bind="'platform.blades.forgotpassword.labels.fail' | translate"></div>
            </div>
            <div class="form-group" ng-if="errors">
                <div class="form-error">{{errors.join() }}</div>
            </div>
            <div class="clearfix" ng-if="!succeeded">
                <div class="column">
                    <div class="form-group">
                        <button ui-sref="loginDialog" class="btn __cancel" ng-disabled="isLoading">
                            <span>{{ 'platform.blades.forgotpassword.labels.back' | translate }}</span>
                        </button>
                    </div>
                </div>
                <div class="column">
                    <div class="form-group __right">
                        <button class="btn" type="submit" ng-disabled="thisForm.$invalid || isLoading">
                            <span>{{ 'platform.blades.forgotpassword.labels.submit' | translate }}</span>
                        </button>
                    </div>
                </div>
            </div>
            <div class="column" ng-if="succeeded">
                <div class="form-group __right">
                    <button class="btn" ng-click="close()">
                        <span>{{ 'platform.commands.ok' | translate }}</span>
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
